<template>
	<view>
		<!-- 模糊背景 -->
		<view class="tag-bg">
			<image src="../../static/topic/topic-bg.png" mode="heightFix" lazy-load></image>
			</view>
		<view class="tag-info">
			<view class="tag-info-heard">
				
				<view class="tag-info-desc">
					<view class="">#{{ tagInfo.tagName }}</view>
					<view class="">{{ tagInfo.num|toStr }}</view>
				</view>
				<image-cache :imgSrc="tagInfo.tagPic" mode="widthFix" :lazyLoad="true"></image-cache>
			</view>
		</view>
	</view>
</template>

<script>
import constant from '../../utils/Constant.js';
import imageCache from '../image-cache/image-cache.vue';
export default {
	components:{
		imageCache
	},
	props: {
		tagInfo: Object
	},
	filters: {
		toStr(val) {
			let text = uni.getStorageSync(constant.user).userSex === 1?'个女生':'个男生';
			return val + text;
		}
	}
};
</script>

<style lang="less" scoped>
.tag-bg {
	width: 100%;
	height: 280rpx;
	position: relative;
	overflow: hidden;
	image {
		position: absolute;
		width: 100%;
		border-bottom-left-radius: 20rpx;
		border-bottom-right-radius: 20rpx;
	}
}
.tag-info {
	position: relative;
	padding: 0 40rpx;
	
	.tag-info-heard {
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		position: absolute;
		bottom: 15rpx;
		width: 100%;
		right: 20rpx;
		
		image {
			vertical-align: middle;
			width: 180rpx;
			height: 180rpx;
			border-radius: 20rpx;
		}
		
		.tag-info-desc{
			display: flex;
			flex-direction: row;
			justify-content: space-around;
			align-items: flex-end;
			margin-left: 40rpx;
			
			&>view:first-child{
				color: #FFFFFF;
				font-size: 38rpx;
			}
			&>view:last-child{
				margin-left: 20rpx;
				color: #FFFFFF;
				font-size: 28rpx;
			}
		}
	}
}
</style>
